﻿using System;
using System.Text;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
@TestRunner.Imports


namespace @Test.Namespace
{
	
	public partial class @Test.ClassName
	{
        @Tag("IBindingList")
		@TestAttribute
		public void @(Test.ClassName + "_IBindingList_AddNew")()
		{
			IBindingList objectUnderTest = CreateCollection();
			
			var originalCount = objectUnderTest.Count;

			if (objectUnderTest.AllowNew) 
			{
				objectUnderTest.AddNew();
				@Assert.AreEqual("originalCount + 1", "objectUnderTest.Count")
			}
		}		

        @Tag("IBindingList")
		@TestAttribute
		public void @(Test.ClassName + "_IBindingList_RemoveAt")()
		{
			IBindingList objectUnderTest = CreateCollection();

			var originalCount = objectUnderTest.Count;

			if (objectUnderTest.AllowRemove)
			{
				objectUnderTest.RemoveAt(0);
				@Assert.AreEqual("originalCount - 1", "objectUnderTest.Count")
			}
		}

        @Tag("IBindingList")
		@TestAttribute
		public void @(Test.ClassName + "_IBindingList_Remove")()
		{
			IBindingList objectUnderTest = CreateCollection();

			var originalCount = objectUnderTest.Count;

			if (objectUnderTest.AllowRemove)
			{
				objectUnderTest.Remove(objectUnderTest[0]);
				@Assert.AreEqual("originalCount - 1", "objectUnderTest.Count")
			}
		}

	}
}

